﻿
@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@model App.Models.RegisterViewModel
<link href="~/Content/upshop/css/login.css" rel="stylesheet" />
<form id="form1" name="" action="/Regist/Index" method="post" enctype="multipart/form-data">
    @Html.ValidationSummary(true)
    <div class="xans-member-login ">
        <div class="regist">
            <h3>CREATE AN ACCOUNT</h3>
            <fieldset>
                <div class="regist_user_info">
                    <div class="regist_user_info_row">
                        <div class="regist_user_info_row_left">
                            <span>First Name<label>*</label></span><br />
                            @*<input id="member_id" name="member_id" value="" type="text" class="xans-member-login-login" />*@
                            @Html.TextBoxFor(s => s.FirstName, new { @maxlength = "50", @class = "xans-member-login-login" })
                            @Html.ValidationMessageFor(s => s.FirstName)
                        </div>
                        <div>
                            <span>Last Name<label>*</label></span><br />
                            @*<input id="member_id" name="member_id" value="" type="text" class="xans-member-login-login" />*@
                            @Html.TextBoxFor(s => s.LastName, new { @maxlength = "50", @class = "xans-member-login-login" })
                            @Html.ValidationMessageFor(s => s.LastName)
                        </div>
                    </div>
                    <div style="width:100%">
                        <div>
                            <span>Email Address<label>*</label></span><br />
                            @*<input id="member_id" name="member_id" value="" type="text" class="xans-member-login-login" />*@
                            @Html.TextBoxFor(s => s.Email, new { @maxlength = "200", @class = "xans-member-login-login" })
                            @Html.ValidationMessageFor(s => s.Email)
                        </div>

                    </div>
                    <div style="width:100%">
                        <input type="checkbox" />SIGN UP FOR NEWSLETTER
                    </div>
                </div>
            </fieldset>
        </div>
        <div class="regist margin50">
            <fieldset>
                <h3>LOGIN INFORMATION</h3>
                <div>
                    <div>
                        <div style="width:100%">
                            <div style="width:50%; float: left">
                                <span style="width:100%">PASSWORD<label>*</label></span><br />
                                @*<input id="member_id" name="member_id" value="" type="text" class="xans-member-login-login" />*@
                                @Html.PasswordFor(s => s.Password, new { @maxlength = "50", @class = "xans-member-login-login" })
                                @Html.ValidationMessageFor(s => s.Password)
                            </div>
                            <div>
                                <span style="width:100%">CONFIRM PASSWORD<label>*</label></span><br />
                                @*<input id="member_id" name="member_id" value="" type="text" class="xans-member-login-login" />*@
                                @Html.PasswordFor(s => s.ConfirmPassword, new { @maxlength = "50", @class = "xans-member-login-login" })
                                @Html.ValidationMessageFor(s => s.ConfirmPassword)
                            </div>
                        </div>
                        <div style="text-align:right;margin:20px 175px; ">
                            <a href="javascript:void(0)" id="btnSumit"><img src="/Content/upshop/web/upload/plain/create.jpg" alt=""></a>
                        </div>
                    </div>
                </div>
            </fieldset>
        </div>
    </div>
</form>
<script>
    $(function () {
        $("body").keydown(function () {
            if (event.keyCode == "13") {//keyCode=13是回车键
                if ($("#form1").valid()) {
                    $("#form1").submit();
                }
            }
        });
        $("#btnSumit").click(function () {
            if ($("#form1").valid()) {
                $("#form1").submit();
            }
        });
    })
</script>